package com.cy.service;

import com.cy.annatation.RequredLog;
import com.cy.mapper.UserMapper;
import com.cy.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class UserServiceImpl implements UserSerice{

    @Autowired
    private UserMapper userMapper;

    @RequredLog
    @Override
    public User select(Integer id) {
        return userMapper.selectUser(id);
    }

    @RequredLog
    @Override
    public int addUser(User user) {

        int rows= userMapper.insertObject(user);
        return rows;
    }
}
